1. Field of the Invention
The invention relates to a method for transforming formats of video data, and more particularly, to a method for transforming formats of video data without degrading the display quality.
2. Description of the Prior Art
Generally, the present TV video output specifications can be classified into an NTSC (National Television Standards Committee)format and a PAL (Phase Alternation Line) format. Regarding the television display conforming to the NTSC specification, the television display corresponds to 525 scan lines, wherein 480 scan lines are effective scan lines for displaying images. Regarding the television display conforming to the PAL format, the television display corresponds to 625 scan lines, wherein 576 scan lines are effective scan lines for displaying images. In other words, the NTSC specification and PAL specification respectively correspond to different resolutions. Basically, concerning both the NTSC specification and the PAL specification, the image frames are interlaced to be output. Please refer to FIG. 1 to FIG. 3. FIG. 1 is a schematic diagram of a display screen 10 according to the prior art, and FIG. 2 is a schematic diagram showing that the display screen 10 shown in FIG. 1 outputs an odd field. FIG. 3 is a schematic diagram showing that the display screen 10 shown in FIG. 1 outputs an even field. The display screen 10 consists of a plurality of scan lines 12, and each scan line 12 comprises a plurality of pixels 14. In order to illustrate the interlaced display operation, only eight scan lines Line1-Line8 are displayed in FIG. 1. According to the NTSC specification and the PAL specification, the odd field and the even field form a complete frame. Regarding the odd field shown in FIG. 2, the display screen 10 can be used to output images by alternate-line scanning; that is, when gray scales of all the pixels 14 are determined from the left side to the right side of the scan line Line1, the scan line Line2 neighboring the scan line Line1 does not operate the settings related to the gray scales of the pixels 14, but immediately determines the gray scale of each pixel 14 of the scan line Line3 from the left side to the right side instead. Similarly, afterwards the scan line Line5 operates the settings related to the gray scale of each pixel 14, and then the scan line Line7 operates the settings related to the gray scale of each pixel 14. Therefore, among all the scan lines 12 on the display screen 10, only the odd-numbered scan lines 12 will be driven to display the odd field. On the other hand, regarding the even field shown in FIG. 3, the display screen 10 can be used to output images by the similar alternate-line scanning. The first scan line Line1 will not be driven while the scan line Line2 neighboring the scan line Line1 will be driven. After the scan line Line2 finishes the settings of the gray scale of each pixel 14 from the left side to the right side, the scan line Line3 neighboring the scan line Line2 does not operate the settings related to the gray scale of each pixel 14 while the scan line Line4 starts to determine the gray scale of each pixel 14 from the left side to the right side. Therefore, among all the scan lines 12 on the display screen 10, only the even-numbered scan lines 12 will be driven to display the even field.
Obviously, after the display screen 10 outputs an odd field and an even field in sequence, each pixel 14 of the display screen 10 has been determined with a corresponding gray scale setting. Concerning the display screen 10, which displays a frame, according to the NTSC specification, the display screen 10 takes 1/60 second to output an odd field or an even field; that is, a frame rate is 30. According to the PAL specification, the display screen 10 takes 1/50 second to output an odd field or an even field, that is, the frame rate is 25. In other words, the image outputs of the NTSC specification and the PAL specification respectively correspond to different frame rates. In summary, regarding the NTSC specification, the resolution of the output image (720*480) is lower with a higher frame rate, while, regarding the PAL specification, the resolution of the output image (720*576) is higher with a lower frame rate.
Since the DVD (digital versatile disc) has the advantage of large capacity for storage, the DVD can be used to store digital data, including video data and audio data. The NTSC specification and the PAL specification respectively correspond to different resolutions and frame rates; when a movie is compressed according to the NTSC format to be recorded on the DVD, a user has to operate a video-output-format transformation process to transform the video data conforming to the NTSC format into that conforming to the PAL format and then utilize a television conforming to the PAL format when the user wants to make use of the television conforming to the PAL format to play the video data conforming to the NTSC format. Please refer to FIG. 4 to FIG. 7. FIG. 4 is a schematic diagram of data conforming to the NTSC format according to the prior art while FIG. 5, FIG. 6, and FIG. 7 are schematic diagrams showing the format transformation from the NTSC format to the PAL format according to the prior art. As shown in FIG. 4, a plurality of the display data 16a, 16b, 16c, 16d, 16e, 16f are shown. Each the display data 16a, 16b, 16c, 16d, 16e, 16f includes a plurality of scan line data 17, while a plurality of the display data 16a, 16b, 16c, 16d, 16e, 16f correspond the NTSC format, wherein the display data 16a, 16c, 16e are used to display the odd field, while the display data 16b, 16d, 16f are used to display the even field. In other words, the display data 16a, 16b are combined to be used to generate a complete frame, the display data 16c, 16d are combined to be used to generate a complete frame, and the display data 16e, 16f are combined to be used to generate a complete frame. Afterwards, according to the prior-art deinterlace technique, the display data 16a, 16b, 16c, 16d, 16e, 16f shown in FIG. 5 can be generated. The display data 16a includes, besides the original scan line data A11, A13, A15, A17, a plurality of scan line data A12′, A14′, A16′, wherein the scan line data A12′ is generated by an inner-insertion operation based on the scan line data A11 and the scan line data A13, the scan line data A14′ is generated by the inner-insertion operation based on the scan line data A13 and the scan line data A15, and the scan line data A16′ is generated by the inner-insertion operation based on the scan line data A15 and the scan line data A17. The above-mentioned inner-insertion operation is an arithmetic mean operation. For instance, regarding the display screen 10 shown in FIG. 1, an arithmetic mean of the gray scale corresponding to the first pixel 14 of the scan line Line1 and the gray scale corresponding to the first pixel 14 of the scan line Line3 can be set as the gray scale corresponding to the first pixel 14 of the scan line Line2. Therefore, the display data of the two scan lines 12 can be used to generate new display data of the scan line located between the two scan lines 12. Regarding the display data 16a shown in FIG. 5, after the inner-insertion operation, the scan line data A12′ is used to substitute for the scan line data A12 of the display data 16b shown in FIG. 4, the scan line data A14′ is used to substitute for the scan line data A14 of the display data 16b, and the scan line data A16 is used to substitute for the scan line data A16 of the display data 16b. In other words, the display data 16a can be used to progressively drive a complete frame.
Regarding the display data 16b shown in FIG. 4, the display data 16b are deinterlaced according to the scan line data A11, A13, A15, and A17 of the display data 16a. As shown in FIG. 5, the refreshed display data 16b can be the same as the display data 16a; that is, the display data 16b include the scan line data A11, A12′, A13, A14′, A15, A16′, A17 after being deinterlaced. From the above-mentioned paragraph, the display data 16c, 16d include the scan line data B11, B12′, B13, B14′, B15, B16′, B17 after being deinterlaced, and the display data 16e, 16f include the scan line data C11, C12′, C13, C14′, C15, C16′, C17 after being deinterlaced. The NTSC specification and the PAL specification respectively correspond to different resolutions; that is, the NTSC specification and the PAL specification respectively utilize the scan lines of different amounts to output images, wherein the PAL specification requires more scan lines. Therefore, the display data 16a, 16b, 16c, 16d, 16e, 16f shown in FIG. 5 should make use of a predetermined algorithm to the scan line data thereof. According to the prior art, a bi-linear interpolation can be used to process the display data 16a, 16b, 16c, 16d, 16e, 16f, shown in FIG. 5, and the result is shown in FIG. 6. Taking the display data 16a as an example, the display data 16a initially include 7 scan line data A11, A12′, A13, A14′, A15, A16′, A17; after being processed by the prior-art bi-linear interpolation, the display data 16a include 9 scan line data A21, A22, A23, A24, A25, A26, A27; that is, the processed display data 16a can be used to drive 9 scan lines to display a frame while the original display data 16a can used to drive only 7 scan lines to display a frame.
Furthermore, the NTSC specification and the PAL specification correspond to different frame rates, wherein the NTSC specification requires displaying 30 frames (30 odd fields and 30 even fields) per-second and the PAL specification requires displaying 25 frames per-second (25 odd fields and 25 even fields). Therefore, when the data conforming to the NTSC specification are transformed to be the data conforming to the PAL specification, one display data should be neglected for every six display data to reduce the frame rate. For instance, the display data 16c will be neglected in FIG. 6, and finally only five display data 16a, 16b, 16d, 16e, 16f can be used to generate image frames. In addition, the display data 16a, 16b, 16d, 16e, 16f shown in FIG. 6 include data for a complete frame. When the data conforming to the PAL specification are interlaced to be output, according to the prior art, generally images are displayed in a single-field way. As shown in FIG. 7, the display data 16a, 16b, 16d, 16e, 16f correspond to the odd field; similarly, the display data 16a, 16b, 16d, 16e, 16f correspond to the even field to proceed with frame display.
Since the NTSC specification and the PAL specification respectively correspond to different frame rates, during the format transformation, one display data (corresponding to 1 field) should be neglected among the six original display data (corresponding to 6 fields) to reduce the frame rate. In addition, in order to solve the nonsmoothness of frame display caused by the reduction of the frame rate, according to the prior art, the single-field way is applied to display the display data conforming to the PAL format. However, the single-field way will lead to a reduction of the resolution. When an odd field and an even field are used to form a frame, the resolution of the frame reduces along with the reduction of the available scan lines if only an odd field or an even field is utilized. Therefore, in order to improve the saw-tooth effect of the frame caused by the reduction of the resolution, the prior-art technique makes use of an arithmetic mean operation to proceed with the deinterlace process as shown in FIG. 5. Afterwards, the bi-linear interpolation is performed to process the display data 16a, 16b, 16c, 16d, 16e, and 16f shown in FIG. 5. Since the above-mentioned deinterlace process can only aim at the scan line data of the odd field to calculate the scan line data of the even field according to the arithmetic mean operation rather than taking the scan line data of the practical even field into consideration, the saw-tooth effect still exists to aggravate the display quality during the transformation of the display data from conforming to the NTSC specification into conforming to the PAL specification.